//
//  main.c
//  Chapter8
//
//  Created by 郭家正 on 2018/12/19.
//  Copyright © 2018 abc. All rights reserved.
//

#include <stdio.h>

int main(int argc, const char * argv[]) {
//    int i=1;
//    printf("%d\n",++i);//i=i+1
//    printf("%d\n",i);
//
//    int a[5] = {1,10,3,4,5};
//    int *p ;
//    p = a;
//    p = &a[0];
//    for (int i = 0; i < 5; i++) {
//        printf("第%d个元素是%d\n",i,a[i]);//a[i]
//    }
    
//    *p = 10;
//    *(p+i)
//    for (int i = 0; i < 5; i++) {
//        *(p + i) += 2;//*(p + i) = *(p + i) + 2;
//        printf("第%d个元素是%d\n",i,p[i]);//a[i]
//    }
    
//    printf("p当前指向第0个元素%d\n",*p);
////    p++;//p = p + 1
//
//    printf("p当前指向第1个元素%d\n",*(++p));
//    printf("p当前指向第1个元素%d\n",*p);
    
//    char string[] = "hello world";
//    char *stringPointer ;
//    stringPointer = string;
//
//    printf("%s\n",stringPointer);
    
    struct student {
        int num;
        char name[100];
        char sex;//m,f
        int age;
        float score;
        char addr[1000];
    } stu1 = {1,"李明",'m',18,92.1,"江苏省南京市鼓楼区"},stu2 = {2,"王刚",'m',19,89,"江苏省苏州市相城区"};
    
//    struct student student1 = {1,"李明",'m',18,92.1,"江苏省南京市鼓楼区"};
//    struct student student2 = {2,"王刚",'m',19,89,"江苏省苏州市相城区"};
    

    
//    struct student students[10];
//    for (int i = 0; i < 10; i++) {
//
//    }
//
    return 0;
}
